<?php
namespace app\zhihui\controller;

use app\common\model\ZhCate as ZhCateModel;
use app\home\controller\Base;

/**
 * 高僧大德控制器
 * Class Zhmonks
 * @package app\index\controller
 */
class Zhcate extends Base
{
    /**
     * [index  列表]
     * @return json
     * @author [C。]
     */
    public function index()
    {
        $param = input('param.');
        $model = new ZhCateModel;
        $this->getPageAndSize($param);
        $map = [];
        try {
            $map['states'] = 1;
            $map['cid'] = $param['cid'];
            $map['comid'] = $param['comid'];
            $data = $model->getAllData($map,'id','id,cname');
        } catch (\Exception $e) {
            systembug($e->getMessage(),2,$this->url);
            return admin_json(-1, $e->getMessage());
        }
        return admin_json(1, '获取成功', $data);
    }
}